import Vue from "vue";
import Vuex from "vuex"

Vue.use(Vuex)

const state = {
  userInfo:null
}

const mutations = {
  SETUSERINFO(state,info){
    state.userInfo = info
  }
}

const actions = {
  setUserInfo(context,info){

    context.commit('SETUSERINFO',info)
  }
}

const store = new Vuex.Store({
  state,
  mutations,
  actions
})

export default store